import { request } from '@/utils/request';
import CRUD from '@/utils/request/CRUD';

// 消息CRUD
export const messageCRUD = CRUD('/ai/chat/message');

// 根据对话ID获取消息列表
export function getMessageListByConversationId(params: Record<string, any>) {
  return request.get({
    url: '/ai/chat/message/list-by-conversation-id',
    params,
  });
}

// 根据对话ID删除消息列表
export function deleteMessageListByConversationId(params: Record<string, any>) {
  return request.delete({
    url: `/ai/chat/message/delete-by-conversation-id?conversationId=${params.conversationId}`,
    params,
  });
}
